/*    */ package com.umeng.newxp.view;
/*    */ 
/*    */ import android.app.Dialog;
/*    */ import android.content.Context;
/*    */ import android.os.Build.VERSION;
/*    */ import android.view.LayoutInflater;
/*    */ import android.view.View;
/*    */ import android.view.ViewGroup.LayoutParams;
/*    */ import android.view.Window;
/*    */ import android.view.WindowManager.LayoutParams;
/*    */ import android.view.animation.Animation;
/*    */ import android.view.animation.AnimationUtils;
/*    */ import android.view.animation.LinearInterpolator;
/*    */ import android.webkit.WebSettings;
/*    */ import android.webkit.WebSettings.LayoutAlgorithm;
/*    */ import android.webkit.WebSettings.PluginState;
/*    */ import android.webkit.WebView;
/*    */ import android.widget.ImageView;
/*    */ import android.widget.RelativeLayout;
/*    */ import com.umeng.common.Log;
/*    */ import com.umeng.newxp.a.a;
/*    */ import com.umeng.newxp.a.c;
/*    */ import com.umeng.newxp.a.d;
/*    */ import com.umeng.newxp.common.ExchangeConstants;
/*    */ import java.lang.reflect.Method;
/*    */ 
/*    */ public class LandingWebViewDialog extends Dialog
/*    */ {
/*    */   private Context b;
/*    */   Animation a;
/*    */ 
/*    */   private void a()
/*    */   {
/* 41 */     ImageView localImageView = (ImageView)findViewById(c.z(this.b));
/* 42 */     localImageView.setVisibility(0);
/*    */ 
/* 44 */     if (this.a == null) {
/* 45 */       this.a = AnimationUtils.loadAnimation(this.b, a.d(this.b));
/*    */     }
/* 47 */     this.a.setInterpolator(new LinearInterpolator());
/* 48 */     this.a.setAnimationListener(new ai(this));
/*    */ 
/* 62 */     localImageView.startAnimation(this.a);
/*    */   }
/*    */ 
/*    */   private void b() {
/* 66 */     ImageView localImageView = (ImageView)findViewById(c.z(this.b));
/* 67 */     localImageView.clearAnimation();
/* 68 */     localImageView.setVisibility(8);
/*    */   }
/*    */ 
/*    */   public LandingWebViewDialog(Context paramContext, String paramString)
/*    */   {
/* 75 */     super(paramContext, 
/* 74 */       ExchangeConstants.full_screen ? 16973841 : 
/* 75 */       16973840);
/* 76 */     this.b = paramContext;
/* 77 */     WindowManager.LayoutParams localLayoutParams = getWindow().getAttributes();
/* 78 */     localLayoutParams.height = -1;
/* 79 */     localLayoutParams.width = -1;
/* 80 */     localLayoutParams.gravity = 17;
/* 81 */     getWindow().setAttributes(localLayoutParams);
/*    */ 
/* 83 */     int i = d.r(paramContext);
/*    */ 
/* 85 */     RelativeLayout localRelativeLayout = (RelativeLayout)LayoutInflater.from(paramContext).inflate(i, null);
/*    */ 
/* 87 */     Window localWindow = getWindow();
/* 88 */     localWindow.setContentView(localRelativeLayout, new ViewGroup.LayoutParams(-1, 
/* 89 */       -1));
/*    */ 
/* 91 */     Log.a(ExchangeConstants.LOG_TAG, paramString);
/*    */ 
/* 93 */     if (paramString != null) {
/* 94 */       a();
/*    */ 
/* 96 */       WebView localWebView = (WebView)findViewById(c.G(this.b));
/*    */ 
/* 99 */       WebSettings localWebSettings = localWebView.getSettings();
/* 100 */       localWebSettings.setJavaScriptEnabled(true);
/* 101 */       if (Build.VERSION.SDK_INT < 8)
/* 102 */         localWebSettings.setPluginsEnabled(true);
/*    */       else {
/* 104 */         localWebSettings.setPluginState(WebSettings.PluginState.ON);
/*    */       }
/* 106 */       localWebSettings.setSupportZoom(true);
/* 107 */       localWebSettings.setBuiltInZoomControls(true);
/* 108 */       localWebSettings.setAllowFileAccess(true);
/* 109 */       localWebSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NORMAL);
/* 110 */       localWebSettings.setUseWideViewPort(true);
/*    */ 
/* 112 */       if (Build.VERSION.SDK_INT >= 8) {
/* 113 */         localWebSettings.setLoadWithOverviewMode(true);
/* 114 */         localWebSettings.setDatabaseEnabled(true);
/* 115 */         localWebSettings.setDomStorageEnabled(true);
/* 116 */         localWebSettings.setGeolocationEnabled(true);
/* 117 */         localWebSettings.setAppCacheEnabled(true);
/*    */       }
/*    */ 
/* 120 */       if (Build.VERSION.SDK_INT >= 11) {
/*    */         try
/*    */         {
/* 123 */           localObject = WebSettings.class.getDeclaredMethod("setDisplayZoomControls", new Class[] { 
/* 124 */             Boolean.TYPE });
/* 125 */           ((Method)localObject).setAccessible(true);
/* 126 */           ((Method)localObject).invoke(localWebSettings, new Object[] { Boolean.valueOf(false) });
/*    */         }
/*    */         catch (Exception localException) {
/* 129 */           Log.e(ExchangeConstants.LOG_TAG, "", localException);
/*    */         }
/*    */       }
/*    */ 
/* 133 */       localWebView.setWebChromeClient(new aj(this));
/*    */ 
/* 141 */       localWebView.setWebViewClient(new ak(this));
/*    */ 
/* 150 */       localWebView.setDownloadListener(new al(this));
/*    */ 
/* 164 */       localWebView.loadUrl(paramString);
/*    */ 
/* 166 */       Object localObject = findViewById(c.e(this.b));
/* 167 */       ((View)localObject).setOnClickListener(new am(this));
/*    */     }
/*    */   }
/*    */ }

/* Location:           C:\Users\Administrator\Desktop\umeng_sdk.jar
 * Qualified Name:     com.umeng.newxp.view.LandingWebViewDialog
 * JD-Core Version:    0.6.2
 */